package com.example.framelayout2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity {
	String user_names;
	String user_passwords;
	private EditText user_name;
	private EditText user_password;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		 
		user_name = (EditText) findViewById(R.id.editText_name);
		user_password = (EditText) findViewById(R.id.editText_password);
		 
		 
		 Button login = (Button) findViewById(R.id.login);
		 login.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				user_names = user_name.getText().toString();
				 user_passwords = user_password.getText().toString();
				 Toast.makeText(MainActivity.this, user_names +" / "+user_passwords, Toast.LENGTH_LONG).show();
			}
		});
		 Button registered = (Button) findViewById(R.id.registered);
		 registered.setOnClickListener(new OnClickListener() {
				
			@Override
			public void onClick(View arg0) {

				
				Intent intent = new Intent();
                intent.setClass(MainActivity.this, RegisteredActivity.class);
                startActivity(intent);
			}
		});
	}

}
